﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Jy123.Web.Manage.User.Guess
{
    public partial class GuessAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //BindGuessType();
        }

        /// <summary>
        /// 绑定竞猜类型
        /// </summary>
        //private void BindGuessType()
        //{ 
        //    BLL.User_Guess_Type bll = new Jy123.BLL.User_Guess_Type();

        //    DDL_GuessType.DataSource = bll.GetAllList();

        //    DDL_GuessType.DataTextField = "TypeName";
        //    DDL_GuessType.DataValueField = "id";
        //    DDL_GuessType.DataBind();
        //}

        protected void btnSave_Click(object sender, EventArgs e)
        {
            Model.User_Guess_Main guess = new Jy123.Model.User_Guess_Main();
            guess.Title = txtTitle.Text;
            guess.Share = Convert.ToInt32(txtShare.Text);
            guess.Point = Convert.ToInt32(txtPoint.Text);
            guess.GuessDays = Convert.ToInt32(txtGuessDays.Text);
            guess.SettlementDays = Convert.ToInt32(txtSettlementDays.Text);
            guess.Multiple = Convert.ToInt32(txtMultiple.Text);

            new BLL.User_Guess_Main().Add(guess);
        }
    }
}
